package com.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 * 前台注册用户
 * @author Jason
 *
 */
@Entity
public class WxUser {
	
	private Integer id;
	private String username;
	private String password;
	private String email;
	private String createTime;
	private String lastLoginTime;
	private boolean status;
	private String createIp;
	private String lastIp;
	private Integer diynum;
	private Integer activityNum;
	private Integer cardNum;
	private boolean cardCreateStatus;
	private Float money;
	private String vipTime;
	private Integer connectNum;
	private WxUserGroup wxgroup;
	
	@ManyToOne
	@JoinColumn(name="groupid")
	public WxUserGroup getWxgroup() {
		return wxgroup;
	}

	public void setWxgroup(WxUserGroup wxgroup) {
		this.wxgroup = wxgroup;
	}

	private Set<WxNumber> wxNumbers = new HashSet<WxNumber>();
	
	public Integer getActivityNum() {
		return activityNum;
	}

	public Integer getCardNum() {
		return cardNum;
	}

	
	public Integer getConnectNum() {
		return connectNum;
	}

	public String getCreateIp() {
		return createIp;
	}

	public String getCreateTime() {
		return createTime;
	}

	public Integer getDiynum() {
		return diynum;
	}

	public String getEmail() {
		return email;
	}

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public String getLastIp() {
		return lastIp;
	}

	public String getLastLoginTime() {
		return lastLoginTime;
	}

	public Float getMoney() {
		return money;
	}

	public String getPassword() {
		return password;
	}

	public String getUsername() {
		return username;
	}

	public String getVipTime() {
		return vipTime;
	}

	@OneToMany(mappedBy="wxuser")
	public Set<WxNumber> getWxNumbers() {
		return wxNumbers;
	}

	public boolean isCardCreateStatus() {
		return cardCreateStatus;
	}

	public boolean isStatus() {
		return status;
	}

	public void setActivityNum(Integer activityNum) {
		this.activityNum = activityNum;
	}

	public void setCardCreateStatus(boolean cardCreateStatus) {
		this.cardCreateStatus = cardCreateStatus;
	}

	public void setCardNum(Integer cardNum) {
		this.cardNum = cardNum;
	}

	public void setConnectNum(Integer connectNum) {
		this.connectNum = connectNum;
	}

	public void setCreateIp(String createIp) {
		this.createIp = createIp;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public void setDiynum(Integer diynum) {
		this.diynum = diynum;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public void setLastIp(String lastIp) {
		this.lastIp = lastIp;
	}

	public void setLastLoginTime(String lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public void setMoney(Float money) {
		this.money = money;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	
	public void setVipTime(String vipTime) {
		this.vipTime = vipTime;
	}

	public void setWxNumbers(Set<WxNumber> wxNumbers) {
		this.wxNumbers = wxNumbers;
	}
}
